<template>
	<view class="">
		<view class="mainCon main-wrap" :class="{show:loaded}">
			<view class="">
				<view class="item-title">{{dataInfo.title}}</view>
				<view class="row between" style="padding-top:20upx;">
					<u-tag :text="dataInfo.categoryName.category" type="error " mode="plain" />
					<view class="row">
						<image src="/static/img/liulanliang.png" mode="" class="yan-icon"></image>
						<text class="item-num">{{dataInfo.seeCounts}}</text>
					</view>
				</view>
				<view class="item-time">{{dataInfo.createDate}}</view>
			</view>
			<jyf-parser :html="dataInfo.detail"></jyf-parser>
		</view>
		<mix-loading v-if="isLoading"></mix-loading>
	</view>
</template>

<script>
	
import jyfParser from "@/components/jyf-parser/jyf-parser.vue";
export default {
	components: {
		jyfParser
	},
	data() {
		return {
			id: "",
			dataInfo: {}
		};
	},
	onLoad(options) {
		this.id = options.id;
		this.loadData();
	},
	methods: {
		async loadData() {
			const res=await this.$request('article/detail',{id:this.id},{showLoading:true});
			if(res.result==0){
				this.dataInfo=res.data
			}else{
				this.$util.msg(res.resultNote)
			}
		}
	}
};
</script>
<style scoped>
.mainCon {
	padding: 40upx;
}

.item-title {
	font-size: 34upx;
	font-family: PingFang SC;
	font-weight: 500;
	color: #000000;
	line-height: 48upx;
}
</style>
